package com.cennavi.minenavidemo.widget;

import android.content.Context;
import android.util.AttributeSet;

import com.minedata.minenavi.navi.JunctionView;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

public class MyJunctionView extends JunctionView {
    private OnJunctionViewListener onJunctionViewListener;

    public MyJunctionView(Context context) {
        super(context);
    }

    public MyJunctionView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void onSurfaceCreated(GL10 gl, EGLConfig config) {
        super.onSurfaceCreated(gl, config);

        if (onJunctionViewListener != null) {
            onJunctionViewListener.onSurfaceCreated(gl, config);
        }
    }

    public void setOnJunctionViewListener(OnJunctionViewListener listener) {
        this.onJunctionViewListener = listener;
    }

    public interface OnJunctionViewListener {

        void onSurfaceCreated(GL10 gl, EGLConfig config);

    }
}
